
import Toast from '../../miniprogram_npm/@vant/weapp/toast/toast'
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    list: {
      type:Array,
      value:[
        {
          bgpath:'/images/bg_tuanwubaike.png',
          titletext:'团务百科',
          btntext:'了解百科',
          color:'#05AC95',
          url:'',
        },
        {
          bgpath:'/images/bg_tongxingangwan.png',
          titletext:'童心港湾',
          btntext:'进入港湾',
          color:'#FFA908',
          url:'',
        },
        {
          bgpath:'/images/bg_saishi.png',
          titletext:'赛事',
          btntext:'查看赛事',
          color:'#FF7E34',
          url:'',
        },
        {
          bgpath:'/images/bg_chuangqingyun.png',
          titletext:'创青春云平台',
          btntext:'进入平台',
          color:'#3989FE',
          url:'',
        }
      ]
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    clickitem(e){
      let index = e.currentTarget.id
      console.log(index)
      if( index==0 ){
        wx.navigateToMiniProgram({
          appId: 'wx96479a8ace5a14dd',
        })
      }
      if( index==1 ){
        Toast('维护中')
      }
      if( index==2 ){
        wx.navigateToMiniProgram({
          appId: 'wx80f54b6b6760ba02',
        })
      }
      if( index==3 ){
        wx.navigateToMiniProgram({
          appId: 'wxc38b1010e98deb46',
        })
      }
    }
  }
})